<template>
    <div  class="deleteBlog"  v-show="this.$store.state.isShowAll">
      <h2>删除博客(弃用)</h2>
      <el-form  :inline="true" >
        <el-form-item >
          <el-input disabled v-model="searchData" placeholder="id/文章名"></el-input>
        </el-form-item>

        <el-form-item >
          <el-button disabled type="primary">搜索</el-button>
        </el-form-item>
      </el-form>

      <el-table  :data="tableData">
        <el-table-column label="文章id">
          <template slot-scope="scope">
            <i class="el-icon-user"></i>
            <span style="margin-left: 10px">{{ scope.row.id }}</span>
          </template>
        </el-table-column>

        <el-table-column label="文章名">
          <template slot-scope="scope">
            <span style="margin-left: 10px">{{ scope.row.title }}</span>
          </template>
        </el-table-column>

        <el-table-column label="创建时间">
          <template slot-scope="scope">
            <span style="margin-left: 10px">{{ scope.row.createTime }}</span>
          </template>
        </el-table-column>

        <el-table-column label="修改时间">
          <template slot-scope="scope">
            <span style="margin-left: 10px">{{ scope.row.updateTime }}</span>
          </template>
        </el-table-column>

        <el-table-column label="用户名">
          <template slot-scope="scope">
            <span style="margin-left: 10px">{{ scope.row.userName }}</span>
          </template>
        </el-table-column>

        <el-table-column label="用户id">
          <template slot-scope="scope">
            <span style="margin-left: 10px">{{ scope.row.userId }}</span>
          </template>
        </el-table-column>

        <el-table-column label="tag">
          <template slot-scope="scope">
            <span style="margin-left: 10px">{{ scope.row.tag }}</span>
          </template>
        </el-table-column>

        <el-table-column label="操作">
          <template slot-scope="scope">
            <el-button
                disabled
                size="mini"
                type="danger"
                @click="handleDelete(scope.$index, scope.row)">删除</el-button>
          </template>
        </el-table-column>
      </el-table>

    </div>
</template>

<script>
    export default {
        name: "DeleteBlog",
        data() {
            return {
                searchData:'',
                tableData: [
                    {
                    id:'1',
                    title: "张三杀人",
                    createTime: '2016-05-02',
                    updateTime: '2016-05-02',
                    userName: '张三',
                    userId: '1',
                    tag: 'asdasdasd'
                    },
                ]
            }
        },
        methods: {
        handleDelete(index, row) {
          console.log(index, row);
        }
      },
    }
</script>

<style scoped>
h2{
  margin: 10px 20px;
}
</style>